#ifndef READER_H
#define READER_H

#include <QThread>
#include <QMutex>
#include <QRunnable>
#include "Library.h"

class Reader : public QThread, public QRunnable
{
	Q_OBJECT
	Library *library;
	int readingTime;
	static QMutex mutex;

public:
	explicit Reader(Library *library, int readingTime, QObject *parent = 0);
	void run();
	void readBook();
	int tryToGetBook();
	void returnBook(int bookId);
	
signals:
	
public slots:
	
};

#endif // READER_H
